package xyz.coolcsm.security.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 什锦
 * @since 2021-06-1
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_blog")
public class Blog implements Serializable {

    private static final long serialVersionUID = 1L;

    //自增id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    //博客标题
    private String title;

    //博客内容
    private String content;

    //排序 0 普通  1 置顶
    private Integer sort;

    //浏览量
    private Integer views;

    //作者
    private String authorId;

    //作者名
    private String authorName;

    //作者头像
    private String authorAvatar;

    //分类id
    private Integer cid;

    @TableField(fill = FieldFill.INSERT)//自动填充
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
